﻿using System;
using wojilu.Web.Mvc.Attr;

namespace wojilu.Web.Controller
{
    public class EnController : BaseTempController
    {
        public EnController()
        {

        }

        [NonVisit]
        public virtual void setpublic()
        {
            set("top", loadHtml(new En. PublicController().Top));
            set("bottom", loadHtml(new En.PublicController().Bottom));
        }

        [HttpGet]
        public virtual void Index()
        {
            view(DefaultTemp + "Index");

            //标题、关键词、描述
            var Title = String.Empty;
            var Keywords = String.Empty;
            var Description = String.Empty;

            Title += YBBCommon.GetLangStr(CurrentLng, "sitetitle");
            Keywords = YBBCommon.GetLangStr(CurrentLng, "keyword");
            Description = YBBCommon.GetLangStr(CurrentLng, "description");

            ctx.Page.SetTitle(Title);
            ctx.Page.Keywords = Keywords;
            ctx.Page.Description = Description;

            setpublic();
            SetPublic();
        }

        public override void Layout()
        {
            view(DefaultTemp + "Public/Layout");

            setpublic();
            SetPublic();
        }
    }
}
